home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Strings
/
ConstCString.h
< prev
next >
Wrap
Text File
|
1997-06-28
|
974b
|
39 lines
// ConstCString.h
#ifndef ConstCString_h
#define ConstCString_h
#ifndef ConstData_h
#include "ConstData.h"
#endif
class ConstCString
{
private:
ConstData text;
static uint32 CStringLength( const int8 * );
public:
ConstCString( const int8 * );
const uint8 *Start() const { return text.Start(); }
const uint8 *End() const { return text.End(); }
uint32 Length() const { return text.Length(); }
URange32 Range() const { return text.Range(); }
bool IsEmpty() const { return Length() == 0; }
const uint8& operator[]( uint32 i ) const { return text[i]; }
ConstData Text() const { return text; }
ConstData Head( uint32 position ) const { return text.Head( position ); }
ConstData Tail( uint32 position ) const { return text.Tail( position ); }
ConstData Middle( URange32 range ) const { return text.Middle( range ); }
operator ConstData() const { return text; }
};
#endif